package com.yh.construct.proxy_pattern.demo1;

import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * @program: design-patterns
 * @description: ${description}
 * @author: yangh0597@163.com
 * @date: 2021-03-13 15:17
 * @problem:
 **/
public class ProxyConCrete626888Controller extends apiFor626888{

    private apiFor626888 apiFor626888;

    public ProxyConCrete626888Controller(com.yh.construct.proxy_pattern.demo1.apiFor626888 apiFor626888) {
        //实际上是注入，这里直接new了
        this.apiFor626888 = new ConreteAPIFor626888Comtroller();
    }

    private void dealWithSession(HttpServletRequest request){
        Cookie[] cookies = request.getCookies();
        //这里用sessionutil去操作 根据header去操作


    }

    @Override
    public Map reportEvent(HttpServletRequest request, Map<String, Object> map) {

        this.dealWithSession(request);
        this.apiFor626888.reportEvent(request,map);

        return null;

    }
}
